<!--
 * @Author: xugj
 * @Date: 2020-07-24 19:49:46
 * @LastEditTime: 2020-07-24 19:56:50
 * @LastEditors: Please set LastEditors
 * @Description: 新闻分类 添加/编辑
 * @FilePath: /XBMemberWeb/content-management/news-management/news-classification-add.html
--> 
<!DOCTYPE html>
<html lang="en" xmlns:width="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no,email=no,address=no">
    <title>网站管理</title>
    <link rel="stylesheet" href="../../icon/iconfont.css">
    <link rel="stylesheet" href="../../plugins/layui/css/layui.css">
    <link rel="stylesheet" href="../../css/nanoscroller.css">
    <link rel="stylesheet" href="../../css/common.css">
    <link rel="stylesheet" href="../../css/style.css">
    <script src="../../js/JQuery2.1.4.js"></script>
    <script src="../../plugins/layui/layui.js"></script>
    <script src="../../js/spin.min.js"></script>
    <script src="../../js/loading.js"></script>
    <script src="../../plugins/ckeditor/ckeditor.js"></script>
    <script src="../../plugins/ckeditor/ckeditor - 4-6.js"></script>
    <script src="../../plugins/ckeditor/config.js"></script>
</head>

<body>
<div class="wrap-box">
    <p class="title-h1"><a href="single-page-classification.html">新闻分类</a><span>/</span><span id="addEdit">添加新闻分类</span></p>
    <div class="language-exchange">
        <div>
            <a data-id="1" class="language-btn active" href="javascript:;">英语</a>
            <a data-id="2" class="language-btn" href="javascript:;">法语</a>
            <a data-id="3" class="language-btn" href="javascript:;">日语</a>
        </div>
    </div>
    <div class="content-scroll-box content-scroll-box3 content-scroll-box-border nano">
        <form class="nano-content ajax-form" onsubmit="return false;">
            <!-- 基本信息开始 -->
            <div class="content-scroll">
                <div class="gray-title">
                    <div class="gray-title-hr"></div> 
                    <p class="gray-title-text">基本信息</p>
                </div>

                <!-- 分类名称开始 -->
                <div class="item-box no-pdt" data-translate="true" data-id="1" style="margin-top: 20px;">
                    <p class="item-title">分类名称<span class="xing">*</span></p>
                    <div class="item">
                        <p class="input">
                            <input type="text"
                                   class="check-input"
                                   name=""
                                   maxlength="200"
                                   data-length="200"
                                   data-lengthText="分类名称不能超过200字符"
                                   data-empty="请输入分类名称"/>
                        </p>
                    </div>
                </div>
                <div class="item-box no-pdt" data-translate="true" data-id="2" style="display: none; margin-top: 20px;">
                    <p class="item-title">分类名称<span class="xing">*</span></p>
                    <div class="item">
                        <p class="input">
                            <input type="text"
                                   class="check-input"
                                   name=""
                                   maxlength="200"
                                   data-length="200"
                                   data-lengthText="分类名称不能超过200字符"
                                   data-empty="请输入分类名称"/>
                        </p>
                    </div>
                </div>
                <div class="item-box no-pdt" data-translate="true" data-id="3" style="display: none; margin-top: 20px;">
                    <p class="item-title">分类名称<span class="xing">*</span></p>
                    <div class="item">
                        <p class="input">
                            <input type="text"
                                   class="check-input"
                                   name=""
                                   maxlength="200"
                                   data-length="200"
                                   data-lengthText="分类名称不能超过200字符"
                                   data-empty="请输入分类名称"/>
                        </p>
                    </div>
                </div>
                <!-- 分类名称结束 -->
                <!-- URL开始 -->
                <div class="item-box no-pdt" data-translate="true" data-id="1" style="margin-top: 20px;">
                    <p class="item-title">URL<span class="xing">*</span></p>
                    <div class="item">
                        <p class="input">
                            <input type="text"
                                   class="check-input"
                                   name=""
                                   maxlength="200"
                                   data-length="200"
                                   data-lengthText="URL不能超过200字符"
                                   data-empty="请输入URL"/>
                        </p>
                    </div>
                </div>
                <div class="item-box no-pdt" data-translate="true" data-id="2" style="display: none; margin-top: 20px;">
                    <p class="item-title">URL<span class="xing">*</span></p>
                    <div class="item">
                        <p class="input">
                            <input type="text"
                                   class="check-input"
                                   name=""
                                   maxlength="200"
                                   data-length="200"
                                   data-lengthText="URL不能超过200字符"
                                   data-empty="请输入URL"/>
                        </p>
                    </div>
                </div>
                <div class="item-box no-pdt" data-translate="true" data-id="3" style="display: none; margin-top: 20px;">
                    <p class="item-title">URL<span class="xing">*</span></p>
                    <div class="item">
                        <p class="input">
                            <input type="text"
                                   class="check-input"
                                   name=""
                                   maxlength="200"
                                   data-length="200"
                                   data-lengthText="URL不能超过200字符"
                                   data-empty="请输入URL"/>
                        </p>
                    </div>
                </div>
                <!-- URL结束 -->
            </div>
            <!-- 基本信息结束 -->
            <!-- SEO优化开始 -->
            <div class="content-scroll" style="margin-top: 10px;">
                <div class="gray-title">
                    <div class="gray-title-hr"></div> 
                    <p class="gray-title-text">SEO优化</p>
                </div>
                <div class="item-box no-pdt" data-translate="true" data-id="1" style="margin-top: 20px;">
                    <p class="item-title">SEO标题</p>
                    <div class="item">
                        <p class="input calcute">
                            <input type="text"
                                   class="check-input"
                                   name="[]"
                                   onkeyup="calculateLength($(this),$(this).siblings('.num'),110)"
                                   maxlength="110"
                                   data-length="110"
                                   data-lengthText="SEO标题不能超过110字符"/>
                            <span class="num">0/110</span>
                        </p>
                    </div>
                </div>
                <div class="item-box no-pdt" data-translate="true" data-id="2" style="display: none; margin-top: 20px;">
                    <p class="item-title">SEO标题</p>
                    <div class="item">
                        <p class="input">
                            <input type="text"
                                   class="check-input"
                                   name="[]"
                                   data-length="255"
                                   data-lengthText="SEO标题不能超过255字符"/>
                        </p>
                    </div>
                </div>
                <div class="item-box no-pdt" data-translate="true" data-id="3" style="display: none; margin-top: 20px;">
                    <p class="item-title">SEO标题</p>
                    <div class="item">
                        <p class="input">
                            <input type="text"
                                   class="check-input"
                                   name="[]"
                                   data-length="255"
                                   data-lengthText="SEO标题不能超过255字符"/>
                        </p>
                    </div>
                </div>
                <div class="item-box" data-translate="true" data-id="1">
                    <p class="item-title">SEO关键词</p>
                    <div class="item">
                        <p class="input calcute">
                            <input type="text"
                                   class="check-input"
                                   name="[]"
                                   onkeyup="calculateLength($(this),$(this).siblings('.num'),200)"
                                   maxlength="200"
                                   data-length="200"
                                   data-lengthText="SEO关键词不能超过200字符"/>
                            <span class="num">0/200</span>
                        </p>
                    </div>
                </div>
                <div class="item-box" data-translate="true" data-id="2" style="display: none">
                    <p class="item-title">SEO关键词</p>
                    <div class="item">
                        <p class="input">
                            <input type="text"
                                   class="check-input"
                                   name="[]"
                                   data-length="255"
                                   data-lengthText="SEO关键词不能超过255字符"/>
                        </p>
                    </div>
                </div>
                <div class="item-box" data-translate="true" data-id="3" style="display: none">
                    <p class="item-title">SEO关键词</p>
                    <div class="item">
                        <p class="input">
                            <input type="text"
                                   class="check-input"
                                   name="[]"
                                   data-length="255"
                                   data-lengthText="SEO关键词不能超过255字符"/>
                        </p>
                    </div>
                </div>
                <div class="item-box" data-translate="true" data-id="1">
                    <p class="item-title">SEO描述</p>
                    <div class="item">
                        <p class="input calcute calcute2">
                            <textarea type="text"
                                      class="check-input"
                                      name="[]"
                                      onkeyup="calculateLength($(this),$(this).siblings('.num'),400)"
                                      maxlength="400"
                                      data-length="400"
                                      data-lengthText="SEO描述不能超过400字符"/></textarea>
                            <span class="num">0/400</span>
                        </p>
                    </div>
                </div>
                <div class="item-box" data-translate="true" data-id="2" style="display: none">
                    <p class="item-title">SEO描述</p>
                    <div class="item">
                        <p class="input">
                            <textarea type="text"
                                      class="check-input"
                                      name="[]"
                                      data-length="255"
                                      data-lengthText="SEO描述不能超过255字符"/></textarea>
                        </p>
                    </div>
                </div>
                <div class="item-box" data-translate="true" data-id="3" style="display: none">
                    <p class="item-title">SEO描述</p>
                    <div class="item">
                        <p class="input">
                            <textarea type="text"
                                      class="check-input"
                                      name="[]"
                                      data-length="255"
                                      data-lengthText="SEO描述不能超过255字符"/></textarea>
                        </p>
                    </div>
                </div>

                <div class="item-box" data-translate="true" data-id="1" style="width:62%;">
                    <p class="item-title">内容</p>
                    <div class="item">
                        <textarea  id="Content1" name="Content1"></textarea>
                    </div>
                </div>

                <div class="item-box" data-translate="true" data-id="2" style="width:62%; display: none;">
                    <p class="item-title">内容</p>
                    <div class="item">
                        <textarea  id="Content2" name="Content2"></textarea>
                    </div>
                </div>

                <div class="item-box" data-translate="true" data-id="3" style="width:62%; display: none;">
                    <p class="item-title">内容</p>
                    <div class="item">
                        <textarea  id="Content3" name="Content3"></textarea>
                    </div>
                </div>

                <div class="item-box">
                    <p class="item-title fl mgr30">开启留言</p>
                    <div class="item turn-btn-div fl">
                        <a href="javascript:;" class="icon iconfont iconswitch-off">
                            <input type="checkbox" name="watermarkbtn" class="turn-btn-input" />
                        </a>
                    </div>
                    <div class="clear"></div>
                </div>

                <div class="item-box">
                    <p class="item-title fl mgr30">开启地图</p>
                    <div class="item turn-btn-div fl">
                        <a href="javascript:;" class="icon iconfont iconswitch-off">
                            <input type="checkbox" name="watermarkbtn" class="turn-btn-input"/>
                        </a>
                    </div>
                    <div class="clear"></div>
                </div>
                
            </div>
            <!-- SEO优化结束 -->
            <div class="item-box item-btn">
                <button type="submit" class="layui-btn ajax-form-commit">保存</button>
                <button type="button" class="layui-btn layui-btn-primary-blue ajax-form-translate">翻译</button>
                <a href="single-page-classification.html" class="layui-btn layui-btn-primary-blue">返回</a>
            </div>
        </form>
    </div>
</div>

<script src="../../js/echarts.min.js"></script>
<script src="../../js/jquery.nanoscroller.js"></script>
<script src="../../js/check.js"></script>
<script src="../../js/common.js"></script>
<script src="../../js/form-commit.js"></script>

<script>
    CKEDITOR.replace( 'Content1' );
    CKEDITOR.replace( 'Content2' );
    CKEDITOR.replace( 'Content3' );
    let type = getQueryVariable("type");
    if (type == 'add'){
        $('#addEdit').text('添加新闻分类');
    }else{
        $('#addEdit').text('编辑新闻分类');
    }
    
    function getQueryVariable(variable)
    {
           var query = window.location.search.substring(1);
           var vars = query.split("&");
           for (var i=0;i<vars.length;i++) {
                   var pair = vars[i].split("=");
                   if(pair[0] == variable){return pair[1];}
           }
           return(false);
    }
    </script>

</body>

</html>